import Main from '../modules/Main.js'
// import Student from "../../modules/students/student.js";
// import AddStudent from "../../modules/students/addstudent.js";
import student from "./student/sutdent.js";
import user from "./user/user.js";



var routes = {
  //$region
  // '/login': () => {
  //   new Login('app')
  // },
  // '/reg': () => {
  //   new Reg('app')
  // },

  //第一种方式
  // '/Main': ()=>{new Main('app')},
  // '/Main/student': ()=>{new Student('app')},
  // '/Main/addstudent': ()=>{new AddStudent('app')}

  //第二种方式
  // '/Main': {
  //   //二级路由
  //   '/student': {
  //     on: () => {
  //       new Student('app')
  //     }
  //   },
  //   '/addstudent': {
  //     on: () => {
  //       new AddStudent('app')
  //     }
  //   },
  //   on: () => {
  //     new Main('app')
  //   }
  // }
  //$endregion


  //第三种方式
  ...user,
  '/Main': {
    ...student, //给student模块的路由展开,
    on: () => {
      new Main('app')
    }
  }
};

var router = Router(routes).configure({
  recurse: 'forward'
});

router.init();

window.location.hash = window.location.hash || "#/login";